package com.xuecheng.base.exception;

/**
 * @author Tang
 * @version 1.0
 * @date 2023/12/26 13:44
 */
public class StudySystemException extends RuntimeException {
    private String errMessage;

    public StudySystemException() {
        super();
    }

    public StudySystemException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }
    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new StudySystemException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new StudySystemException(errMessage);
    }
}
